perm filename DOC2[GEM,BGB] blob sn#090002 filedate 1974-03-06 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00011 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	EUCLIDEAN TRANSFORMATIONS.
C00006 00003	STRENGTH OF TRANSFORMATION.
C00009 00004	GROUP OF COMMANDS:  INPUT/OUTPUT.
C00012 00005	CAMERA FILE FORMAT.
C00014 00006	B3D FILE FORMAT
C00015 00007	GEM FILE FORMAT
C00017 00008	GROUP OF COMMANDS:  SWITCHES.
C00019 00009	GROUP OF COMMANDS: LINK FOLLOWING.
C00022 00010	GROUP OF COMMANDS: LINK FOLLOWING.
C00026 00011	GROUP OF COMMANDS: DISPLAY CONTROL.
C00027 ENDMK
C⊗;
EUCLIDEAN TRANSFORMATIONS.

The Euclidean  geometric transformations  are translation,  rotation,
dilation  and  reflection; these  transformations do  not  affect the
topology of  faces,  edges and  vertices. The  top  of the  stack  is
transformed  by  hitting one  of  the  following Euclidean  transform
characters:

  :	Transform in the positive direction wrt the X-axis.	
  ;	Transform in the negative direction wrt the X-axis.
  )	Transform in the positive direction wrt the Y-axis.
  (	Transform in the negative direction wrt the Y-axis.
  *	Transform in the positive direction wrt the Z-axis.
  -	Transform in the negative direction wrt the Z-axis.

Clearly these characters are not mnemonics,  they were chosen because
they do not require the TOP key and are conveniently grouped in pairs
under one's  right hand.  The  transform is  selected by  keying  the
control bits or or prefixing the command with a control key character
of suffering a preselected default Transform:

		default  -  usually TRANSLATION.
α      		ROTATION.
β		DILATION.
ε	 	REFLECTION.

The Euclidean transformation default selection characters are:

!		TRANSLATION.
@		ROTATION.

	Translation moves the  top object in the  direction specified
by  one unit  of translation strength.   Similairly  rotation rotates
the top object  about the axis  specified by  one unit of  rotational
strength. Positive rotations are ccw and negative rotations are cw.

	Dilations  refer to  a  three state  dilation axis  selector.
Dilation  state 1  causes  dilation on  the specified  axis, dilation
state 2 causes dilation on the two axes not  indicated,  and dilation
state 3  causes dilation on all  the axes.  The  dilation selector is
advanced by typing "βA". The state of the  dilation axis selector  is
displayed as  a digit 1,  2 or 3  just to the  right of  the dilation
strength's  per cent sign in  the editor status display  at the upper
right of the III  screen.
STRENGTH OF TRANSFORMATION.

The strength of a Euclidean transformation can be halved or
doubled by keying the transform's control bits and by striking
slash or back slash respectively.

	/	Halve a Transformation Strength.
	\	Double a Transformation Strength.

The strength of a  Euclidean transformation can be set  by keying the
Transform's control bits  and by striking a digit from 0 to 9. Keying
control-meta digits sets the strength of translation; a digit without
control or meta keying contributes to the iteration count.

For Translation:
	ε0	1/16 of a foot,  A "binary inch".
	ε4	One Foot.
	ε9	32 Feet.
	εN	Where 0 ≤ N ≤ 9 yield 2.0↑(N-4) feet,
		but you only need to memorize the 0,4,9 in
		order to keep your head straight.
For Rotation:
	α9	π/2
	α8	π/4
	   etc
For Dilation:
	β0	100%
	β1	10%
	β2	20%
	   etc
	β9	90%

	The strengths of the Euclidean Transformations can be entered
numerically by typing λ,π or % followed by a numerical argument.   In
command formats given below x & y are scanned as real numbers,  while
n,  m,  d & s are scanned as integers. Integers can be typed in place
of reals with no ill affect, whereas reals  typed  for  integers  are
Fixed.

For Translation:
	λx	feet.		Initially set to 1 foot.
	λx'	feet.
	λx'y"	feet and inches.
	λy"	inches.
For Rotation:
	ππ/m	pi fraction.	Initially set to π/4.
	πn/m	pi fraction.
	πx	radians.
	πd,m,s	degrees, minutes, seconds of arc.
For Dilation:
	%x	0.00 < X  Divisions by zero are shunned.
		Initially set to 75%
GROUP OF COMMANDS:  INPUT/OUTPUT.

"I"	input B3D file.		"O"	output B3D file.
"αI"	input CAM file.		"αO"	output CAM file.
"βI"	input CRE film.		"βO"	output TRI file.
"εI"	input D3D file.		"εO"	output D3D file.
X IGEM	input GEM file.		X OGEM	output GEM file.

"βZ"	take commands from GEO file.
"P"	output PLT file of current III buffer.


	"I" and "O" are the commands for  input and output. There are
three file  formats for polyhedra named B3D,  D3D, and GEM. The plain
"O" command will output  a body (and all its  parts) from the top  of
the stack into  a B3D file. The  plain "I" command will  input a body
(and all its parts) from a B3D file and will push it on the stack.

	The "X IGEM" and "X OGEM" are  extend commands that work like
"I"  and "O", but are  dumping and restoring more  of the contents of
each body, face, edge and vertex for the sake of GEOMES (SAIL) users.

	The "αI" and "αO" input and output CAM files to and from the
node of the "now" camera.

	The D3D format  is the "dump"  mode format. On  output, "εO",
the  node space  is compacted  and the origin  is subtracted  off all
links ("un"-relocatation) and the whole node space is dumped  out; on
input the space is read in and relocated.

	The "βI"  inputs a CRE  film and places  a film  of perceived
CRE  images  on the  "now"-camera's  node. The  "βO"  command  is for
outputing the "now"-predicted image  into a TRI file (triangles)  for
the sake  of MKVID (make video)  which does the scan  line conversion
for synthesizing video images.

CAMERA FILE FORMAT.

A GEOMED camera file consists of exactly twelve words:
---------------------------------------------------------------------
CAMERA FILE

	WORD	NAME	CONTENTS

	0	CX	Camera lens center location
	1	CY	...in world coordinates
	2	CZ	...in centimeters

	3	PAN	Camera principle ray orientation
	4	TILT	...with respect to world coordinates
	5	SWING	...in radians

	6	PDX	Width  of a pixel in microns.
	7	PDY	Height of a pixel in microns.
	8	PDZ	Depth  of a pixel in microns.

	9	FOCAL	Focal plane distance in millimeters.
       10	LDX	Width of image raster in pixels.
       11	LDY	Height of image raster in pixels.

---------------------------------------------------------------------
CONVERSION FROM CAMERA FRAME TO P.T.S.

	TILT  ←  ACOS(KX);
	TMP   ←  1/SIN(TILT);
	PAN   ←  ATAN2(KX*TMP,-KY*TMP);
	SWING ←  ACOS (JZ*TMP);

CONVERSION FROM P.T.S. TO CAMERA FRAME.

	FRAME ← MKROT1(PAN,TILT,SWING);
	
---------------------------------------------------------------------
B3D FILE FORMAT
---------------------------------------------------------------------
	BODY HEADER - 18 WORDS.

		0	Parts CounT
		1	Face  Count
		2	Edge  Count
		3	Vertex Count

	     4  5	PNAME

	  6  7  8	XWC YWC ZWC
	  9 10 11 	IX IY IZ
	 12 13 14 	JX JY JZ
	 15 16 17 	KX KY KZ

	FACES - 2 WORDS EACH.

		BYTE(9)RED,GRN,BLU,ALB	;REFLECTIVITIES.
		BYTE(6)R,G,B,W,M,N	;LUMINOUSITIES.

	EDGES - 4 WORDS EACH.

		XWD NFACE,PFACE
		XWD NVT,PVT
		XWD NCW,PCW
		XWD NCCW,PCCW

	VERTICES - 3 WORDS EACH.

		XWC
		YWC
		ZWC
GEM FILE FORMAT
---------------------------------------------------------------------
	BODY HEADER - 20 WORDS.

		0	Parts CounT
		1	Face  Count
		2	Edge  Count
		3	Vertex Count

	     4  5	PNAME

			TYPE BITS - MEMORY[BODY+0]
			USER WORD - MEMORY[BODY+8]

	  6  7  8	XWC YWC ZWC
	  9 10 11 	IX IY IZ
	 12 13 14 	JX JY JZ
	 15 16 17 	KX KY KZ

	FACES - 2 WORDS EACH.

		BYTE(9)RED,GRN,BLU,ALB	;REFLECTIVITIES.
		BYTE(6)R,G,B,W,M,N	;LUMINOUSITIES.
		TYPE BITS - MEMORY[FACE+0]
		USER WORD - MEMORY[FACE+8]

	EDGES - 4 WORDS EACH.

		XWD NFACE,PFACE
		XWD NVT,PVT
		XWD NCW,PCW
		XWD NCCW,PCCW
		TYPE BITS - MEMORY[EDGE+0]
		USER WORD - MEMORY[EDGE+8]

	VERTICES - 3 WORDS EACH.

		XWC
		YWC
		ZWC
		TYPE BITS - MEMORY[EDGE+0]
		USER WORD - MEMORY[EDGE+8]
GROUP OF COMMANDS:  SWITCHES.

switch		commentary


"Q" - FRMORG
	FRMORG affects world frame rotations.
	TRUE *		rotation about a world axis,
			thru the world origin.
	FALSE		rotation about a parallel to a world axis,
			thru the body origin.
	FRMORG is flipped by the Q-command.
	The state of FRMORG is indicated by an asterisked in the
	Editor's Status Display.  The asterisk is present when
	FRMORG is true and absent when FRMORG is false.

"F" - FRAME
	FRAME is a four state switch that affects translation,
	rotation and dilation.
	state-1	indicates World Frame of Reference.
	state-2	indicates Body  Frame of Reference.
	state-3	indicates Relative Frame of Reference.
	state-4	indicates Camera Frame of Reference.
	FRAME is incremented, modulo 4, by the F-command.
	(and decremented modulo 4 by the βF command).

"βA" - AXECNT
	AXECNT affects  only dilations.
	state-1 indicates dilation only on the specified axis.
	state-2 indicates dilation on the two axes not specified.
	state-3 indicates dilation on all three axes.
	The state of dilation is indicated by a digit to the right of
	the dilation strength's percent sign in the GEOMED Status Display.
	AXECNT is incremented, modulo 3, by the A-command.
GROUP OF COMMANDS: LINK FOLLOWING.

The GEOMED data structure is composed of 16 kinds of nodes:

	FRAME		EMPTY 		UNIVERSE	SUN
	CAMERA		WORLD		WINDOW		IMAGE
	TEXT		XNODE		YNODE		ZNODE
	BODY		FACE		EDGE		VERTEX

The root  of  the data  structure is  the  UNIVERSE node,   which  is
unique,   and which can be  pushed into the stack  by hitting the "⊗"
command. Directly accessible  from the UNIVERSE node,   the user  may
fetch the DISPLAY ring and the WORLD ring:

	"∩" of the UNIVERSE	returns the "now" WORLD.
	"∪" of the UNIVERSE	returns the "first" WORLD.
	"." of the UNIVERSE	returns the "now" display.
	"," of the UNIVERSE	returns the "first" display.

A display  is  not a  node,  but is  rather a  ring  of windows.  The
refresh subroutine GEODPY,  refreshs the windows of the "now" display
ring.

	"⊂" and "⊃" of a WINDOW travels the Window Ring of a display.
   	"." and "," of a WINDOW travels the Display Ring of the UNIVERSE.

Each world has at least one camera, one  sun, and a ring of
bodies (which is initially empty).

	"←" of a WORLD		returns the "first" SUN.
	"∩" of a WORLD		returns the "now" CAMERA.
	"∪" of a WORLD		returns the "first" CAMERA.
	"." and "," of a WORLD travels the World's Body Ring.
	"⊂" and "⊃" of a WORLD travels the World Ring of the UNIVERSE.

Each camera points back  to the world to which it  belongs ("∪"); and
belongs  to   that  worlds  camera  ring  ("⊂"   and  "⊃");  and  has
potentially two rings  of images: the sythetic  image ring (".")  and
the perceived image ring (",").
GROUP OF COMMANDS: LINK FOLLOWING.

	A  polyhedral  surface  is  composed   of  faces,  edges  and
vertices.  Each particular face, edge,  or vertex belongs  to one and
only one body; and in turn each  body has a ring of faces, a ring  of
edges and a ring of vertices:

	"<" and ">" of a body travels the Face Ring of that body.
	"≤" and "≥" of a body travels the Edge Ring of that body.
	"∨" and "∧" of a body travels the Vertex Ring of that body.

	When the "αL" switch is toggled ON, a numeral is displayed at
each vertex of the body in the top of the stack. The N'th vertex of a
body a be brought  into the stack  by typing "αV" numeral-N.  Besides
belonging to rings, vertices and  faces have one additional link, the
PED or first edge link which points to one of the edges of the vertex
or face. The PED of a  vertex or face in the top of the  stack can be
obtained by typing "≥".

	Besides belonging to an  edge ring, each edges points  at its
two faces, its two vertices and its four neighboring edges in each of
its two faces; these last four pointers are the so called  "wings" of
the edge and are used to travel the perimeters of faces and vertices.
Thus with an edge in the top of the stack, either of its two faces
or two vertices can be obtained by typing one of the four characters
"<>∨∧" respectively.

	When the top two positions of the stack contain an edge and a
face  (or an  edge and  a vertex)  that  are linked,   then  both are
intensified and  face  (or vertex)  perimeter traveling  is  possible
using the "," or  the "." commands to obtain the  next edge about the
face  (or vertex)  from  the given  edge, going  in the  clockwise or
counter clockwise direction (as seen from the exterior surface of the
polyhedron). It  is also possible while perimeter  traveling to cross
to the other face (or vertex) of  the given edge by means of the  "+"
command. Finally, whenever there is a face, edge or vertex in the top
of the  stack, the body to which it belongs  can be obtained by using
the "B" command.
GROUP OF COMMANDS: DISPLAY CONTROL.